## 100000 variables, hence 100000 t-tests will be performed
x = matrix( rnorm(100 * 100000), ncol = 100000 )
## 100 observations in total
ina = rbinom(100, 1, 0.6) + 1 ## independent samples t-test
system.time( ttests(x, ina) )
ina = rep(1:2, each = 50) ## dependent samples t-test
system.time( ttests(x, ina, paired = TRUE) )
Run the code above in your browser using DataLab